<?php 
$this->layout = false;
Yii::app()->clientScript->registerCoreScript('jquery');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    </head>
    <body>
        <script language="JavaScript">
        <!--
            if (location.hash.match(/^\#\/.*/)) {
                // log it
                ref = '<?php Yii::app()->request->getUrlReferrer(); ?>';
                $.ajax({
                    url: '<?php echo baseUrl() ?>/?r=Core/service/ajax',
                    data: {'SID':'Cms.Url.logOldUrl', 'ref':ref,'url':location.hash},
                    async: false
                });
                uri = location.hash.replace('#/','');
                
                // fix it
                if (uri.match(/[a-zA-Z0-9-_]+\/.+/))
                // tab link
                    location = 'http://'+location.host+'/'+uri.replace('/','.html#');
                if (uri.match(/[a-zA-Z0-9-_]+\?.+/))
                // querystring link
                    location = 'http://'+location.host+'/'+uri.replace('?','.html?');
                else {
                // standard link
                    uri = uri.replace('.html','');
                    location = 'http://'+location.host+'/'+uri+'.html';
                }
            } else {
                location.replace('<?php echo Yii::app()->request->baseUrl ?>/index.html');
            }      
        //-->
        </script>
        <noscript>Your browser does not support JavaScript or have it disabled. Please enable JavaScript and <a href="<?php echo baseUrl()?>/index.html">click here</a> to view our site.</noscript>
    </body>
</html>